package com.gupt.weekly.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * @author linzizun
 * @version 1.0
 * @date 2021/03/25 10:46
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "周报信息")
@TableName(value = "tb_report")
public class Report {
    @ApiModelProperty(value = "主键非空", example = "自动生成，引号内删掉留空")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @NotBlank(message = "填写人信息有误")
    @ApiModelProperty(value = "填写人，关联tb_user.id", example = "")
    private String user_id;

    @NotBlank(message = "关联计划信息有误")
    @ApiModelProperty(value = "所属计划，关联tb_plan.id", example = "")
    private String plan_id;

    @ApiModelProperty(value = "本周工作总结", example = "日常工作稳步推进")
    private String summary;

    @ApiModelProperty(value = "提交时间", example = "")
    private Date submit_time;

    @Max(value = 1, message = "数据不符合规格（0 否，1 是）")
    @Min(value = 0, message = "数据不符合规格（0 否，1 是）")
    @ApiModelProperty(value = "已提交：0 否，1 是", example = "0")
    private Integer has_submit;
}
